#if($type == 'uploadSuccessForEditor')
<html>
<head>
<title></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
</head>
<body>
<script type="text/javascript">
parent.parent.KE.plugin["image"].insert("${id[0]}", "${url.base}${fileURI}","${imgTitle[0]}","${imgWidth[0]}","${imgHeight[0]}","${imgBorder[0]}","${align[0]}");
</script>
</body>
</html>
#end

#if($type == 'uploadFailureForEditor')
<html>
<head>
<title>error</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body>
<script type="text/javascript">alert("${message}");</script>
</body>
</html>
#end

#if($type == 'uploadPhotoSuccess')
<html>
<head>
<title>success</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body>
<iframe id="reloadPhoto" name="reloadPhoto" src="${url.base}/reloadPhoto.jsp?src=${url.base}${model.CUA.photoPath}"></iframe>
<script type="text/javascript">
parent.reloadPhoto('${url.base}${model.CUA.photoPath}');
iframe=document.getElementById('reloadPhoto');
function reload(){
	if(iframe.contentWindow.location.href.indexOf('${url.base}') != -1){
		iframe.contentWindow.location.reload(true);
	} else {
		setTimeout(function(){reload();},100);
	}
}
reload();
</script>
</body>
</html>
#end

#if($type == 'uploadPhotoFailure')
<html>
<head>
<title>error</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body>
<script type="text/javascript">alert("${message}");</script>
</body>
</html>
#end